<!DOCTYPE html>
<html>
<head>

<title>Multiple Upload</title>
 <script type="text/javascript" src="../../js/mootools.js"></script>
 <script type="text/javascript" src="Request.File.js"></script>
 <script type="text/javascript" src="Form.MultipleFileInput.js"></script>
 <script type="text/javascript" src="Form.Upload.js"></script>
 <link href="styles.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

window.addEvent('domready', function() {

	var upload = new Form.Upload('url', {
            onComplete: function() {
                alert('Completed uploading the Files');
            }
	});

	if(!upload.isModern()) {
            // Use something like
            //console.log('isModern');
	}

//        upload.addEvent('submit', function(evt) {
//            console.log('submit evt=',evt);
//            event.preventDefault();
//            inputFiles.getFiles().each(function(file){
//                request.append('url[]' , file);
//            });
//            request.send();
//        });
});

</script>

</head>
<body>

    <div id="wrapper">
        <form method="post" action="UploadJSON" enctype="multipart/form-data">
            <input type="hidden" name="exec" value="upload"/>
            <fieldset>
                <legend>Upload Files</legend>

                <div class="formRow">
                    <label for="url" class="floated">File: </label>
                    <input type="file" id="url" name="url[]" multiple />
                </div>

                <div class="formRow">
                    <input type="submit" id="_submit" name="_submit" value="Upload" />
                </div>

            </fieldset>
        </form>
    </div>

</body>
</html>
